package com.yenlien.traceyun.business.entity;

import com.alibaba.druid.sql.visitor.functions.Char;
import com.alibaba.fastjson.annotation.JSONField;
import com.yenlien.traceyun.business.trace.Trace;
import com.yenlien.traceyun.webase.entity.BaseEntity;
import com.yenlien.traceyun.webase.entity.BaseIdEntity;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 分包
 */
@Entity
@Table(name = "t_plant_box")
public class Box extends BaseEntity {

    @Column(name = "source_code", length = 35, unique = true)
    private String sourceCode;            //溯源码
    @Column
    private String subpackageId;        //分包ID
    @Column
    private String printMsgId;            //打印模板ID

    @Column(name = "company_id")
    private String companyId;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createtime")
    private Date createtime = new Date();

    /**
     * 分包批次
     */
    @Column(name = "subpackage_batch", length = 30)
    private String subpackageBatch;

    /**
     * 应用id
     */
    @Column(name = "app_id", length = 32)
    private String appId;

    @Column(name = "activation", length = 5)
    private Boolean activation = false;            //激活

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public String getSubpackageId() {
        return subpackageId;
    }

    public void setSubpackageId(String subpackageId) {
        this.subpackageId = subpackageId;
    }

    public String getPrintMsgId() {
        return printMsgId;
    }

    public void setPrintMsgId(String printMsgId) {
        this.printMsgId = printMsgId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSubpackageBatch() {
        return subpackageBatch;
    }

    public void setSubpackageBatch(String subpackageBatch) {
        this.subpackageBatch = subpackageBatch;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Boolean getActivation() {
        return activation;
    }

    public void setActivation(Boolean activation) {
        this.activation = activation;
    }
}
